package cn.javabb.core.plugin.thymeleaf.util;

import cn.javabb.core.service.biz.NavService;
import cn.javabb.core.entity.biz.NavDO;
import cn.javabb.common.utils.SpringContextUtil;
import org.springframework.util.CollectionUtils;

import java.util.List;

public class NavUtil {

    public List<NavDO> list(Integer typeId){
        NavService navService = SpringContextUtil.getBean(NavService.class);
        List<NavDO> navList = navService.listNavs(typeId);
        if (CollectionUtils.isEmpty(navList)) {
            return null;
        }
        return navList;
    }



}
